package com.boco.blch.analysiser.compliance.HW.data;

import com.boco.blch.analysiser.compliance.ComplianceResolved;

public class BOCO_Spark_VisitCtl_AppAcountMinAuth implements ComplianceResolved{

	@Override
	public int realEchoResolved(String echoResult) {
		String[] echoResult1=echoResult.split("\n");
		boolean flag=false;
		if(echoResult != null && echoResult.trim().length() > 0){
			for(int i=0;i<echoResult1.length;i++){
				if(echoResult1[i]!=null&&echoResult1[i].length()>0&&echoResult1[i].contains(":")){
					String[] str=echoResult1[i].split(":");
					if(!str[0].trim().equals("sys")&&!str[0].trim().equals("root")&&
							!str[0].trim().equals("adminsrator")&&!str[0].trim().equals("super")){
						flag=true;
					}else{
						flag=false;
						break;
					}
				}
			}
		}
		if(flag==true){
			return SUCCESS;
		}else{
			return FAILED;
		}
	}

}
